package function;

import java.util.function.Consumer;
import java.util.function.Supplier;

/**
 * Consumer 消费型接口：只有输入，没有返回值
 */
public class Demo3 {
    public static void main(String[] args) {
/*        Consumer<String> stringConsumer = new Consumer<String>(){

            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        };*/
        Consumer<String> stringConsumer = (s)->{
            System.out.println(s);;};
        stringConsumer.accept("adadasd");

    }
}